import request from '../utils/httpRequest';
//获取地址列表
export const addressListApi = (id) => {
    return request.get({
        url: `/app-api/member/address/list`,
    });
};
//新建地址
export const createAddress = (data) => {
    return request.post({
        url: `/app-api/member/address/create`,
        data
    });
};
//获取省市区
export const areaTree = (query) => {
    return request.get({
        url: `/app-api/system/area/tree2`,
    });
};
//编辑地址
export const updateAddress = (data) => {
    return request.post({
        url: `/app-api/member/address/update`,
        data
    });
};
//删除地址
export const deleteAddress = (id) => {
    return request.get({
        url: `/app-api/member/address/delete?id=` + id
    });
};
// 地址详情
export const getAddress = (id) => {
    return request.get({
        url: `/app-api/member/address/get?id=` + id
    });
};
// 获取默认地址
export const defaulAddress = () => {
    return request.get({
        url: `/app-api/member/address/get-default`
    });
};